<?php

namespace Yj\Generator\Core\Model;

class EloquentModel extends ClassModel
{
    /**
     * @var BasePropertyModel[]
     */
    protected $properties = [];

    /**
     * @return BasePropertyModel[]
     */
    public function getProperties(): array
    {
        return $this->properties;
    }

    /**
     * @param BasePropertyModel[] $properties
     */
    public function setProperties(array $properties)
    {
        $this->properties = $properties;
        return $this;
    }

    /**
     * @var string
     */
    protected $tableName;

    /**
     * @return string
     */
    public function getTableName()
    {
        return $this->tableName;
    }


    /**
     * @param string $tableName
     *
     * @return $this
     */
    public function setTableName($tableName)
    {
        $this->tableName = $tableName;
        return $this;
    }

    public function addProperty(BasePropertyModel $property)
    {
        $this->properties[] = $property;
        return $this;
    }



}